using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Numerics;
using Nethereum.Hex.HexTypes;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.RPC.Eth.DTOs;
using Nethereum.Contracts.CQS;
using Nethereum.Contracts;
using System.Threading;

namespace ProtocolContracts.Contracts.OrderValidatorTest.ContractDefinition
{


    public partial class OrderValidatorTestDeployment : OrderValidatorTestDeploymentBase
    {
        public OrderValidatorTestDeployment() : base(BYTECODE) { }
        public OrderValidatorTestDeployment(string byteCode) : base(byteCode) { }
    }

    public class OrderValidatorTestDeploymentBase : ContractDeploymentMessage
    {
        public static string BYTECODE = "608060405234801561001057600080fd5b5061116b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806397b014ab1161006657806397b014ab146100e6578063b99817ac146100f9578063bb2e5a3614610101578063c56d89b514610114578063eb0f89331461011e57610093565b80632bfcc665146100985780633408e470146100c15780636d963695146100d657806378e890ba146100de575b600080fd5b6100ab6100a6366004610eb8565b610131565b6040516100b89190610f49565b60405180910390f35b6100c9610185565b6040516100b89190610f54565b6100c9610189565b6100c9610198565b6100c96100f4366004610e7d565b6101a2565b6100c96101bd565b6100c961010f366004610e45565b6101c7565b61011c6101da565b005b6100c961012c366004610e7d565b610284565b600061017b61013f85610f8d565b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506102a592505050565b5060019392505050565b4690565b600061019361055a565b905090565b6000610193610560565b60006101b56101b083610f8d565b61059b565b90505b919050565b600061019361068b565b60006101b56101d583610f81565b610691565b600054610100900460ff16806101f357506101f3610701565b80610201575060005460ff16155b61023c5760405162461bcd60e51b815260040180806020018281038252602e8152602001806110e6602e913960400191505060405180910390fd5b600054610100900460ff16158015610267576000805460ff1961ff0019909116610100171660011790555b61026f610712565b8015610281576000805461ff00191690555b50565b6000806102936101b084610f8d565b905061029e816107e2565b9392505050565b608082015161032a5781516001600160a01b0316156103255781516001600160a01b03166102d161082e565b6001600160a01b031614610325576040805162461bcd60e51b815260206004820152601660248201527536b0b5b2b91034b9903737ba103a3c1039b2b73232b960511b604482015290519081900360640190fd5b610556565b81516001600160a01b031661033d61082e565b6001600160a01b0316146105565760006103568361059b565b905061036e83600001516001600160a01b0316610832565b156104aa578251630b135d3f60e11b906001600160a01b0316631626ba7e610395846107e2565b856040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103e85781810151838201526020016103d0565b50505050905090810190601f1680156104155780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561043357600080fd5b505afa158015610447573d6000803e3d6000fd5b505050506040513d602081101561045d57600080fd5b50516001600160e01b031916146104a55760405162461bcd60e51b815260040180806020018281038252602b8152602001806110bb602b913960400191505060405180910390fd5b610554565b82516001600160a01b03166104c8836104c2846107e2565b90610838565b6001600160a01b03161461050d5760405162461bcd60e51b81526004018080602001828103825260228152602001806110996022913960400191505060405180910390fd5b82516001600160a01b0316610554576040805162461bcd60e51b815260206004820152600860248201526737379036b0b5b2b960c11b604482015290519081900360640190fd5b505b5050565b60335490565b60006101937f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61058e61055a565b61059661068b565b6108b8565b60007f477ed43b8020849b755512278536c3766a3b4ab547519949a75f483372493f8d82600001516105d08460200151610691565b84604001516105e28660600151610691565b86608001518760a001518860c001518960e001518a610100015180519060200120604051602001808b81526020018a6001600160a01b03168152602001898152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001836001600160e01b03191681526020018281526020019a5050505050505050505050604051602081830303815290604052805190602001209050919050565b60345490565b60007fdb6f72e915676cfc289da13bc4ece054fd17b1df6d77ffc4a60510718c236b086106c1836000015161091a565b8360200151604051602001808481526020018381526020018281526020019350505050604051602081830303815290604052805190602001209050919050565b600061070c30610832565b15905090565b600054610100900460ff168061072b575061072b610701565b80610739575060005460ff16155b6107745760405162461bcd60e51b815260040180806020018281038252602e8152602001806110e6602e913960400191505060405180910390fd5b600054610100900460ff1615801561079f576000805460ff1961ff0019909116610100171660011790555b61026f6040518060400160405280600881526020016745786368616e676560c01b815250604051806040016040528060018152602001601960f91b815250610984565b60006107ec610560565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b3390565b3b151590565b60008151604114610890576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a6108ae86828585610a44565b9695505050505050565b60008383836108c5610185565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b03168152602001955050505050506040516020818303038152906040528051906020012090509392505050565b8051602091820151805190830120604080517f452a0dc408cb0d27ffc3b3caff933a5208040a53a9dbecd8d89cad2c0d40e00c818601526001600160e01b031990931683820152606080840192909252805180840390920182526080909201909152805191012090565b600054610100900460ff168061099d575061099d610701565b806109ab575060005460ff16155b6109e65760405162461bcd60e51b815260040180806020018281038252602e8152602001806110e6602e913960400191505060405180910390fd5b600054610100900460ff16158015610a11576000805460ff1961ff0019909116610100171660011790555b82516020808501919091208351918401919091206033919091556034558015610554576000805461ff0019169055505050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610aa55760405162461bcd60e51b81526004018080602001828103825260228152602001806110776022913960400191505060405180910390fd5b6000601e8560ff161115610b7f576004850360ff16601b1480610ace57506004850360ff16601c145b610b095760405162461bcd60e51b81526004018080602001828103825260228152602001806111146022913960400191505060405180910390fd5b6001610b1487610c9a565b60048703868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610b6e573d6000803e3d6000fd5b505050602060405103519050610c36565b8460ff16601b1480610b9457508460ff16601c145b610bcf5760405162461bcd60e51b81526004018080602001828103825260228152602001806111146022913960400191505060405180910390fd5b60018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610c29573d6000803e3d6000fd5b5050506020604051035190505b6001600160a01b038116610c91576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b95945050505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b80356001600160a01b03811681146101b857600080fd5b80356001600160e01b0319811681146101b857600080fd5b600082601f830112610d2a578081fd5b813567ffffffffffffffff811115610d3e57fe5b610d51601f8201601f1916602001610f5d565b818152846020838601011115610d65578283fd5b816020850160208301379081016020019190915292915050565b60006040808385031215610d91578182fd5b805181810167ffffffffffffffff8282108183111715610dad57fe5b818452829450853581811115610dc257600080fd5b8601808803851315610dd357600080fd5b608084018381108382111715610de557fe5b8552610df081610d02565b83526020810135945081851115610e0657600080fd5b610e1288868301610d1a565b60608501525050815260209384013593019290925292915050565b60006101208284031215610e3f578081fd5b50919050565b600060208284031215610e56578081fd5b813567ffffffffffffffff811115610e6c578182fd5b82016040818503121561029e578182fd5b600060208284031215610e8e578081fd5b813567ffffffffffffffff811115610ea4578182fd5b610eb084828501610e2d565b949350505050565b600080600060408486031215610ecc578182fd5b833567ffffffffffffffff80821115610ee3578384fd5b610eef87838801610e2d565b94506020860135915080821115610f04578384fd5b818601915086601f830112610f17578384fd5b813581811115610f25578485fd5b876020828501011115610f36578485fd5b6020830194508093505050509250925092565b901515815260200190565b90815260200190565b60405181810167ffffffffffffffff81118282101715610f7957fe5b604052919050565b60006101b53683610d7f565b6000610120808336031215610fa0578182fd5b610fa981610f5d565b9050610fb483610ceb565b8152602083013567ffffffffffffffff80821115610fd0578384fd5b610fdc36838701610d7f565b6020840152610fed60408601610ceb565b60408401526060850135915080821115611005578384fd5b61101136838701610d7f565b60608401526080850135608084015260a085013560a084015260c085013560c084015261104060e08601610d02565b60e08401526101009150818501358181111561105a578485fd5b61106636828801610d1a565b838501525050508091505091905056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c75656f72646572207369676e617475726520766572696669636174696f6e206572726f72636f6e7472616374206f72646572207369676e617475726520766572696669636174696f6e206572726f72496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a656445434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220055d3e985130f27ac5095b2c20a371f1b3b6ea8f35301b7c46f89ef953133ea164736f6c63430007060033";
        public OrderValidatorTestDeploymentBase() : base(BYTECODE) { }
        public OrderValidatorTestDeploymentBase(string byteCode) : base(byteCode) { }

    }

    public partial class EIP712NameHashFunction : EIP712NameHashFunctionBase { }

    [Function("EIP712NameHash", "bytes32")]
    public class EIP712NameHashFunctionBase : FunctionMessage
    {

    }

    public partial class EIP712VersionHashFunction : EIP712VersionHashFunctionBase { }

    [Function("EIP712VersionHash", "bytes32")]
    public class EIP712VersionHashFunctionBase : FunctionMessage
    {

    }

    public partial class OrdervalidatortestInitFunction : OrdervalidatortestInitFunctionBase { }

    [Function("__OrderValidatorTest_init")]
    public class OrdervalidatortestInitFunctionBase : FunctionMessage
    {

    }

    public partial class DomainSeparatorV4Function : DomainSeparatorV4FunctionBase { }

    [Function("domainSeparatorV4", "bytes32")]
    public class DomainSeparatorV4FunctionBase : FunctionMessage
    {

    }

    public partial class GetChainIdFunction : GetChainIdFunctionBase { }

    [Function("getChainId", "uint256")]
    public class GetChainIdFunctionBase : FunctionMessage
    {

    }

    public partial class HashAssetFunction : HashAssetFunctionBase { }

    [Function("hashAsset", "bytes32")]
    public class HashAssetFunctionBase : FunctionMessage
    {
        [Parameter("tuple", "asset", 1)]
        public virtual Asset Asset { get; set; }
    }

    public partial class HashOrderFunction : HashOrderFunctionBase { }

    [Function("hashOrder", "bytes32")]
    public class HashOrderFunctionBase : FunctionMessage
    {
        [Parameter("tuple", "order", 1)]
        public virtual Order Order { get; set; }
    }

    public partial class HashTypedDataV4Function : HashTypedDataV4FunctionBase { }

    [Function("hashTypedDataV4", "bytes32")]
    public class HashTypedDataV4FunctionBase : FunctionMessage
    {
        [Parameter("tuple", "order", 1)]
        public virtual Order Order { get; set; }
    }

    public partial class ValidateOrderTestFunction : ValidateOrderTestFunctionBase { }

    [Function("validateOrderTest", "bool")]
    public class ValidateOrderTestFunctionBase : FunctionMessage
    {
        [Parameter("tuple", "order", 1)]
        public virtual Order Order { get; set; }
        [Parameter("bytes", "signature", 2)]
        public virtual byte[] Signature { get; set; }
    }

    public partial class EIP712NameHashOutputDTO : EIP712NameHashOutputDTOBase { }

    [FunctionOutput]
    public class EIP712NameHashOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("bytes32", "", 1)]
        public virtual byte[] ReturnValue1 { get; set; }
    }

    public partial class EIP712VersionHashOutputDTO : EIP712VersionHashOutputDTOBase { }

    [FunctionOutput]
    public class EIP712VersionHashOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("bytes32", "", 1)]
        public virtual byte[] ReturnValue1 { get; set; }
    }



    public partial class DomainSeparatorV4OutputDTO : DomainSeparatorV4OutputDTOBase { }

    [FunctionOutput]
    public class DomainSeparatorV4OutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("bytes32", "", 1)]
        public virtual byte[] ReturnValue1 { get; set; }
    }

    public partial class GetChainIdOutputDTO : GetChainIdOutputDTOBase { }

    [FunctionOutput]
    public class GetChainIdOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("uint256", "chainId", 1)]
        public virtual BigInteger ChainId { get; set; }
    }

    public partial class HashAssetOutputDTO : HashAssetOutputDTOBase { }

    [FunctionOutput]
    public class HashAssetOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("bytes32", "", 1)]
        public virtual byte[] ReturnValue1 { get; set; }
    }

    public partial class HashOrderOutputDTO : HashOrderOutputDTOBase { }

    [FunctionOutput]
    public class HashOrderOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("bytes32", "", 1)]
        public virtual byte[] ReturnValue1 { get; set; }
    }

    public partial class HashTypedDataV4OutputDTO : HashTypedDataV4OutputDTOBase { }

    [FunctionOutput]
    public class HashTypedDataV4OutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("bytes32", "", 1)]
        public virtual byte[] ReturnValue1 { get; set; }
    }

    public partial class ValidateOrderTestOutputDTO : ValidateOrderTestOutputDTOBase { }

    [FunctionOutput]
    public class ValidateOrderTestOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("bool", "", 1)]
        public virtual bool ReturnValue1 { get; set; }
    }
}
